<?php if(count($skolas) > 1){?>

   <script type="text/javascript">


   ddaccordion.init({
       headerclass: "silverheader", //Shared CSS class name of headers group
       contentclass: "submenu", //Shared CSS class name of contents group
       revealtype: "mouseover", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
       mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
       collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
       defaultexpanded: [0], //index of content(s) open by default [index1, index2, etc] [] denotes no content
       onemustopen: true, //Specify whether at least one header should be open always (so never all headers closed)
       animatedefault: false, //Should contents open by default be animated into view?
       persiststate: true, //persist state of opened contents within browser session?
       toggleclass: ["", "selected"], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
       togglehtml: ["", "", ""], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
       animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
       oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
           //do nothing
       },
       onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
           //do nothing
       }
   })


   </script>

   <style type="text/css">
   .applemenu{
   margin: 0 5px;
   padding: 0;
   width: 170px; /*width of menu*/
   border: 1px solid #9A9A9A;
   }

   .applemenu div.silverheader a{
   background: black url(/images/silvergradient.gif) repeat-x center left;
   font: normal 12px Tahoma, "Lucida Grande", "Trebuchet MS", Helvetica, sans-serif;
   color: white;
   display: block;
   position: relative; /*To help in the anchoring of the ".statusicon" icon image*/
   width: auto;
   padding: 5px 0;
   padding-left: 8px;
   text-decoration: none;
   }


   .applemenu div.silverheader a:visited, .applemenu div.silverheader a:active{
   color: white;
   }


   .applemenu div.selected a, .applemenu div.silverheader a:hover{
   background-image: url(/images/silvergradientover.gif);
   color: white;
   }

   .applemenu div.submenu{ /*DIV that contains each sub menu*/
   background: white;
   padding: 5px;
   height: 300px; /*Height that applies to all sub menu DIVs. A good idea when headers are toggled via "mouseover" instead of "click"*/
   }

   .submenu ul li a {
       text-decoration: none;
       color: #000;
       padding-left: 5px;
   }
   </style>

   <div id="h1">
     <p id="h_ime">Operater: <?php echo $operater ?></p>
   </div>
   <div id="h3">
     <ul id="sec">
       <li><?php echo link_to(__('Podešavanja profila'), 'user/settings') ?></li>
       <li><?php echo link_to(__('Predlozi / greške'), 'greske/greske', array('style' => ($greska_nbs) ? 'font-weight: 700; padding-right: 0;' : '')) ?><?php echo (($greska_nbs) ? '<sup>'.$greska_nbs.'</sup>' : '') ?></li>
       <li><?php echo link_to(__('Izloguj se'), 'user/logout', array('class' => 'logout')) ?></li>
     </ul>
   </div>

   <div class="applemenu" style="float:left;">
     <?php foreach($skolas as $skola)
     {?>
       <div class="silverheader"><?php echo link_to($skola->getIme().' - '.$skola->getMesto(), 'home/index') ?></div>
         <div class="submenu">

           <ul>
             <li><h3>Dnevni unos</h3></li>
             <li><?php echo link_to('ocene i domaci','unos/unos', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('grupni unos','unos/grupni', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('obaveštenja','unos/obavestenja', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('zaključne ocene','unos/zakljucne', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('stare ocene','unos/stare', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('obrazac za unos','unos/obrazac', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><h3>Administracija</h3></li>
             <li><?php echo link_to('profesori','profesor/index', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('učenici','ucenik/index', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('roditelji','roditelj/index', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
             <li><?php echo link_to('razredi','razred/index', array('query_string' => 'skola_id='.$skola->getId())) ?></li>
           </ul>

         </div>
     <?php }?>

   </div>

<?php } else{
   $skola = $skolas[0]; $skola_id = $skola->getId();
   ?>

   <div id="h1">
     <p id="h_ime"><?php echo SkolaPeer::$tip_string[$skola->getTip()].' '.$skola ?> - <?php echo $operater ?></p>
     <div class="menu_wide">

        <ul>

            <li><a href="javascript: void(0)" class="bf_button"><span>Dnevni unos</span><!--[if IE 7]><!--></a><!--<![endif]-->
            <!--[if lte IE 6]><table><tr><td><![endif]-->
               <ul>
                  <li><?php echo link_to('<span>'.__('ocene i domaći').'</span>', 'unos/unos?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('grupni unos').'</span>', 'unos/grupni?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('obaveštenja').'</span>', 'unos/obavestenja?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('zaključne ocene').'</span>', 'unos/zakljucne?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('stare ocene').'</span>', 'unos/stare?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('obrazac za unos').'</span>', 'unos/obrazac?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
               </ul>
               <!--[if lte IE 6]></td></tr></table></a><![endif]-->
            </li>

            <li><a href="javascript: void(0)" class="bf_button"><span>Administracija</span><!--[if IE 7]><!--></a><!--<![endif]-->
            <!--[if lte IE 6]><table><tr><td><![endif]-->
               <ul>
                  <li><?php echo link_to('<span>'.__('profesori').'</span>', 'profesor/index?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('učenici').'</span>', 'ucenik/index?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('roditelji').'</span>', 'roditelj/index?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
                  <li><?php echo link_to('<span>'.__('razredi').'</span>', 'razred/index?skola_id='.$skola_id, array('class' => 'bf_button')) ?></li>
               </ul>
               <!--[if lte IE 6]></td></tr></table></a><![endif]-->
            </li>

        </ul>

      </div>

   </div>
   <div id="h3">
     <ul id="sec">
         <li><?php echo link_to(__('Podešavanja profila'), 'user/settings') ?></li>
         <li><?php echo link_to(__('Predlozi / greške'), 'greske/greske', array('style' => ($greska_nbs) ? 'font-weight: 700; padding-right: 0;' : '')) ?><?php echo (($greska_nbs) ? '<sup>'.$greska_nbs.'</sup>' : '') ?></li>
         <li><?php echo link_to(__('Izloguj se'), 'user/logout', array('class' => 'logout')) ?></li>
     </ul>
   </div>

<?php }?>